# !/usr/bin/python3
# -*- coding:utf-8 -*-
"""
@author: JHC000abc@gmail.com
@file: main.py
@time: 2024/10/23 18:26 
@desc: 
celery -A tasks worker  --loglevel=info --pool=solo
celery -A tasks worker --loglevel=info --pool=threads --concurrency=4
"""

from config import DEBUG, FLASK_CONFIG
from flask import Flask
from blues.routes_base import base_bp
from blues.routes_task import tasks_bp
from blues.route_auth import auth_blue

app = Flask(__name__)
app.register_blueprint(base_bp)
app.register_blueprint(tasks_bp)
app.register_blueprint(auth_blue)

if __name__ == '__main__':
    if not DEBUG:
        app.run()
    else:
        app.run(
            host=FLASK_CONFIG["host"],
            port=FLASK_CONFIG["port"],
            debug=DEBUG
        )
